package com.wn.sk.member.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author yellow Docter
 * @date 2022 -11-09
 * @desc
 *
 *  hibernate-validator 框架中常见的 校验注解:
 *
 *    @NotBlank  校验字符串          message 是校验失败的信息提示
 *    @NotEmpty  校验字符串、集合容器(map,array)
 *    @NotNull   任意类型
 *    @Range(min = 10,max = 80)     范围校验
 */
@Data
@ApiModel(value = "User对象", description = "会员用户表")
public class UserDto {

    @NotBlank(message = "手机不能为空")
    @ApiModelProperty("用户手机")
    private String mobile;

    @NotBlank(message = "用密码不能为空")
    @ApiModelProperty("用户登录密码")
    private String password;

}
